import { ResizeObserver } from '@juggle/resize-observer';
import React, { Component } from 'react';
export default function Browser(props){
  const ro = new ResizeObserver((entries, observer) => {
    console.log('<<<<<<<<<<<<<<<<<<<<<Body has resized!');
    console.log(entries[0].contentRect);
    observer.disconnect(); // Stop observing
  });
  const target = React.useRef(null);
  React.useEffect(()=>{
    ro.observe(target.current); // Watch dimension changes on body
  },[])
  return (
      <p  ref={target}>
        hello
      </p>
    );
}
